const a = async function (
  _,
  { row },
  _01,
  { dc: { open, close, setModal }, xe: { get } }
) {
  const layout = { id: "1797803357425512450" };
  const modal = {
    title: "编辑支付收款单位",
    width: "55vw",
    height: document.body.clientHeight * 0.35,
    defaultFullscreen: false,
    destroyOnClose: false,
    maskClosable: false,
    open: true,
    centered: true,
    showCancelBtn: true,
  };
  const inner = {
    onOk: async function (_, { origin }, { dc: { http, message } }) {
      const params = get(origin, "1797803359870791682", {});
      if (!params.recName) return message.error("请先选择支付收款单位");
      setModal({ confirmLoading: true });
      try {
        const { code, msg } = await http.post(
          {
            url: "/qyk/bz/updateRtkDta",
            data: { id: row.pid, recName: params.recName },
          },
          { isTransformResponse: false }
        );
        setModal({ confirmLoading: false });
        if (code !== 200) {
          message.error(msg);
        } else {
          close(true);
        }
      } catch (error) {
        setModal({ confirmLoading: false });
      }
    },
  };
  open({ inner, layout, modal, transfer: row });
};
